/*
 * TileLayer 是标准的使用xyz数字的瓦片层
 */

T.OSMTile = T.Layer.extend({

	options: {
	}

	,initialize: function (options) {
	    this.options = T.setOptions(this, options);
	}
	
	,onAdd: function(map) {
	    this._loadSource();
        this._loadLayer();
        
        map.tinyMap.addLayer(this.layer);
	}
	
	,_loadSource: function(){
	    this.source = new ol.source.OSM();
	}
	
	,_loadLayer: function(){
	    this.layer = new ol.layer.Tile({source: this.source});
	}
});

T.osmTile = function () {
	return new T.OSMTile();
};
